Having clause:

It used to group the records which are already grouped by group by cluase.

Rule:
1. The aggregate function OR any boolean expression is allowed in having clause

2. The aggregate function used in group by clause need not to be same as aggregate function used in having clause

3. The having clause should be followed by group by clause.


Q: Group the employees based on job & display only those records where employee count is >3?
Ans:


Q: Group the employees based on the salesman job from emp table?
Ans:
